package com.asset.dispoal.role.service.commom;


import com.asset.dispoal.role.domain.db.mapper.GbRoleMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import tech.mhuang.pacebox.core.ddd.BaseCommand;
import tech.mhuang.pacebox.springboot.protocol.Result;

/**
 * @author qr
 * @date 2022/3/2$
 */
@Component
public class DeleteRoleCommand implements BaseCommand<String, Result> {

    @Autowired
    GbRoleMapper gbRoleMapper;

    @Override
    public Result execute(String id) {
        gbRoleMapper.delete(id);
        return Result.ok();
    }
}
